package com.ukao.cashregister.bean;

import com.ukao.cashregister.utils.CheckUtils;

import java.io.Serializable;

/**
 * 优惠券
 * Created by ukaodev on 2017/6/3.
 */

public class Coupons extends BaseListBean<Coupons> implements Serializable {


             public String  mercId;//1,
              public long timeEnd;//1503652678000,
              public int amount;//null,
              public String orderId;//null,
              public String cityId;//1,
              public String storeId;//null,
              public String couponId;//8,
              public String userId;//1,
              public Integer fullAmount;//250,
              public long usedTime;//null,
              public long  timeStart;//null,
              public int  isOverdue;//1,
              public String  statusText;//"已使用",
              public String  status;//1
                private  String  couponRuleName;
            private  int  useStatus;
            private  String  useStatusText;

    public String name;
    public String type;
    public String valid_date;
    public String available_condition;
    public String credits;
    public String id;
    public String out_of_date;
    private  int  isValid;
    private   boolean  check;  /*选中*/
    private  int  enableUse;
    private  int useBalance;  //余额是否使用

    public int getUseBalance() {
        return useBalance;
    }

    public void setUseBalance(int useBalance) {
        this.useBalance = useBalance;
    }

    public boolean getEnableUse() {
      boolean  IsOtAllow= false; /*1是可用*/
        if (enableUse==1){
            IsOtAllow= true;
        }
        return IsOtAllow;
    }


    public int getIsValid() {
        return isValid;
    }

    public void setEnableUse(int enableUse) {
        this.enableUse = enableUse;
    }

    public boolean getUseStatus() {
        boolean useStatu=false;
            if (useStatus==1){/*正式使用*/
                useStatu=true;

            }

        return useStatu;
    }


    public void setUseStatus(boolean useStatus) {
        if (useStatus){
            this.useStatus =1;
        }else {
            this.useStatus =0;
        }


    }



    public String getUseStatusText() {


        return useStatusText;
    }

    public String getCouponRuleName() {
        return couponRuleName;
    }

    public String getMercId() {
        return mercId;
    }

    public long getTimeEnd() {
        return timeEnd;
    }

    public int getAmount() {
        return amount;
    }

    public String getOrderId() {
        return orderId;
    }

    public String getCityId() {
        return cityId;
    }

    public String getStoreId() {
        return storeId;
    }

    public String getCouponId() {
        return couponId;
    }

    public String getUserId() {
        return userId;
    }

    public Integer getFullAmount() {
        return fullAmount;
    }

    public long getUsedTime() {
        return usedTime;
    }

    public long getTimeStart() {
        return timeStart;
    }

    public boolean getIsOverdue() {
       boolean isValid=false;
            if (getIsValid()==0){/*过期*/
                isValid=true;

            }


        return isValid;
    }

    public String getStatusText() {
        return statusText;
    }

    public String getStatus() {
        return status;
    }

    public boolean isCheck() {
        return check;
    }

    public void setCheck(boolean check) {
        this.check = check;
    }




    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getValid_date() {
        return valid_date;
    }

    public void setValid_date(String valid_date) {
        this.valid_date = valid_date;
    }

    public String getAvailable_condition() {
        return available_condition;
    }

    public void setAvailable_condition(String available_condition) {
        this.available_condition = available_condition;
    }

    public String getCredits() {
        return credits;
    }

    public void setCredits(String credits) {
        this.credits = credits;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOut_of_date() {
        return out_of_date;
    }

    public void setOut_of_date(String out_of_date) {
        this.out_of_date = out_of_date;
    }



}
